#ifndef SHAPE_H
#define SHAPE_H

#include <iostream>

class Shape {
public:
    Shape() = default;

    virtual ~Shape() = default;

    virtual void draw() = 0;
};


class Rectangle : public Shape {
public:
    Rectangle() = default;

    ~Rectangle() override = default;

    void draw() override;
};

class Circle : public Shape {
public:
    Circle() = default;

    ~Circle() override = default;

    void draw() override;
};

// 抽象装饰类（装饰器）
class ShapeDecorator : public Shape {
public:
    explicit ShapeDecorator(Shape *pShape);

    void draw() override;

protected:
    Shape *m_decoratedShape;
};

// 实体装饰类（装饰器实例）
class RedShapeDecorator : public ShapeDecorator {
public:
    explicit RedShapeDecorator(Shape *pShape);

    void draw() override;

private:
    void setRedBorder(Shape *decoratedShape);
};

#endif // SHAPE_H
